package com.ctgu.rabbitmq.controller;

import com.ctgu.rabbitmq.service.IdempotentService;
import com.ctgu.rabbitmq.utils.ApiResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ ClassName IdempotentController
 * @ Author Alex2
 * @ Date 2025/8/18 14:48
 **/
@RestController
@RequestMapping("/api/idempotent")
public class IdempotentController {

    @Autowired
    private IdempotentService idempotentService;

    /**
     * @ Author: Alex
     * @ Description: 消息幂等性
     */
    // http://localhost:8080/api/idempotent/idempotent
    @GetMapping("idempotent")
    public ApiResult idempotent() {
        return idempotentService.idempotent();
    }
}
